﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddEdit.aspx.cs" Inherits="CardLogistics.Web.MainPage.Purchase.Contract_PayInfo.AddEdit" %>

<%@ Register Src="../../../Controls/WebUserControl_Nav.ascx" TagName="WebUserControl_Nav"
    TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>付款登记_新增编辑</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/selPage.css" rel="stylesheet" type="text/css" />
    <script src="../../../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../../js/valReq.js" type="text/javascript"></script>
    <script src="../../../js/jquery.js" type="text/javascript"></script>
    <script src="../../../js/jquery.tipswindow.2.0.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function valReq() {
            //非空校验
            var altStr = valid_isempty('CheckNo', '凭证号');
            //必须为字母或者数字
            altStr += valid_isnoCh('CheckNo', '凭证号');
            altStr += valid_isempty('INVOICENO', '发票单号');
            //付款金额非空校验（付款金额可以为0）
            var money = document.getElementById("PayMoney").value;
            if (money == "")
                altStr += "付款金额不可为空!\n";
            altStr += valid_isempty('PAYDATE', '付款日期');
        
            if (altStr != "") {
                alert(altStr);
                return false;
            }
       
            else {
                return true;
            }
        }
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#CheckNo").click(function () {
                $.tipsWindow({
                    ___title: "选择入库单号",
                    ___content: "iframe:../../SelectPage/SelStorageCheck.aspx",
                    ___width: "1000",
                    ___height: "500",
                    ___drag: "___boxTitle",
                    ___showbg: true
                });
            });
        })
    </script>
</head>
<body>
    <form id="Form1" runat="server">
    <uc1:WebUserControl_Nav ID="WebUserControl_Nav1" runat="server" />
    <table class="theForm" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="titleTxt">
               凭证号：
            </td>
            <td class="contentTxt">
                <input id="CheckNo" runat="server" type="text" class="dfinputImg" maxlength="15"/>
                <asp:HiddenField ID="hf_CheckId" runat="server" />
            </td>
            <td class="titleTxt">
                发票单号：
            </td>
            <td class="contentTxt">
                <input id="INVOICENO" runat="server" type="text" class="dfinputNoEmp" maxlength="25"  />
            </td>
        </tr>
        <tr>
            <td class="titleTxt">
                付款金额(元)：
            </td>
            <td class="contentTxt">
                <input id="PayMoney" runat="server" type="text" maxlength="9" class="dfinputNoEmp" onkeydown="onlyNum();"/>
            </td>
                <td class="titleTxt">
                付款日期：
            </td>
            <td class="contentTxt">
                <input id="PAYDATE" runat="server" type="text" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
            </td>
        </tr>
        <tr>
        
            <td class="titleTxt">
                付款方式：
            </td>
            <td class="contentTxt">
                <asp:DropDownList ID="PAYTYPE" runat="server" CssClass="dfinput">
                    <asp:ListItem Selected="True" Value="0">银行转账</asp:ListItem>
                    <asp:ListItem  Value="1">汇款</asp:ListItem>
                    <asp:ListItem  Value="2">支票</asp:ListItem>
                    <asp:ListItem  Value="3">本票</asp:ListItem>
                    <asp:ListItem  Value="4">现金</asp:ListItem>
                    <asp:ListItem  Value="5">其他方式</asp:ListItem>
                </asp:DropDownList>
            </td>

             <td class="titleTxt">
                经办人：
            </td>
            <td class="contentTxt">
                <input id="ATTN" runat="server" type="text" class="dfinput"  maxlength="25" />
            </td>
        </tr>
        <tr>
            <td class="titleTxt">
                备注：
            </td>
            <td colspan="3">
                <input id="REMARK" runat="server" type="text" class="dfinput" maxlength="200" style="width:90%" />
            </td>
        </tr>
        <tr>
            <td colspan="4" align="center">
                <asp:Button ID="btn_Add" CssClass="btn" runat="server" Text="保存" OnClientClick="return valReq();"
                    OnClick="btn_Add_Click" />
                <input type="button" class="btn" value="返回" onclick="javascript:history.go(-1);" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
